/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
+/* Define to 1 if you have the `exp2' function. */
+#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
+#define HAVE_EXP2 1
+#endif
+
/* Define to 1 if you have the `flockfile' function. */
#undef HAVE_FLOCKFILE
/* Define to 1 if you have the `localtime_r' function. */
/* #undef HAVE_LOCALTIME_R */
+/* Define to 1 if you have the `log2' function. */
+#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
+#define HAVE_LOG2 1
+#endif
+
/* Define to 1 if you have the `lstat' function. */
/* #undef HAVE_LSTAT */
# Check for round(), rint(), isnan(), isinf() and nearbyint()
AC_CHECK_LIB(m,round,,)
-AC_CHECK_FUNCS(round rint nearbyint sincos)
+AC_CHECK_FUNCS(round rint nearbyint sincos exp2 log2)
AC_CHECK_DECLS([isnan, isinf], [], [], [[#include <math.h>]])
# Checks for gdkspawn
return (!_finite (x) && !_isnan (x));
}
#endif
+
+#ifndef INFINITY
+/* define INFINITY for compilers that lack support for it */
+# ifdef HUGE_VALF
+# define INFINITY HUGE_VALF
+# else
+# define INFINITY (float)HUGE_VAL
+# endif
+#endif
+
+#ifndef HAVE_LOG2
+/* Use a simple implementation for log2() for compilers that lack it */
+static inline double
+log2 (double x)
+{
+ return log (x) / log (2.0);
+}
+#endif
+
+#ifndef HAVE_EXP2
+/* Use a simple implementation for exp2() for compilers that lack it */
+static inline double
+exp2 (double x)
+{
+ return pow (2.0, x);
+}
+#endif
#include "config.h"
#include <string.h>
-#include <math.h>
#include "gtkprogressbar.h"
#include "gtkorientableprivate.h"
#include "a11y/gtkprogressbaraccessible.h"
+#include "fallback-c89.c"
+
/**
* SECTION:gtkprogressbar
* @Short_description: A widget which indicates progress visually
#include "gtkwindow.h"
#include "gtkcssproviderprivate.h"
-#include <math.h>
+#include "fallback-c89.c"
#ifdef GDK_WINDOWING_X11
#include "x11/gdkx.h"